{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "  CalendarId                 Date                 Country  Category  \\\n",
      "0     183323  2019-04-08T00:00:00                 Albania  Holidays   \n",
      "1     183325  2019-04-08T00:00:00  Bosnia and Herzegovina  Holidays   \n",
      "2     183312  2019-04-08T00:00:00                Bulgaria  Holidays   \n",
      "3     183316  2019-04-08T00:00:00                  Cyprus  Holidays   \n",
      "4     183321  2019-04-08T00:00:00                   Egypt  Holidays   \n",
      "5     183326  2019-04-08T00:00:00                Ethiopia  Holidays   \n",
      "6     183313  2019-04-08T00:00:00                 Georgia  Holidays   \n",
      "7     183318  2019-04-08T00:00:00                  Greece  Holidays   \n",
      "8     183322  2019-04-08T00:00:00                  Kosovo  Holidays   \n",
      "9     183315  2019-04-08T00:00:00               Macedonia  Holidays   \n",
      "\n",
      "                    Event Reference Unit Source Actual Previous Forecast  \\\n",
      "0  Orthodox Easter Sunday                                                  \n",
      "1  Orthodox Easter Sunday                                                  \n",
      "2  Orthodox Easter Sunday                                                  \n",
      "3  Orthodox Easter Sunday                                                  \n",
      "4    Coptic Easter Sunday                                                  \n",
      "5           Easter Sunday                                                  \n",
      "6  Orthodox Easter Sunday                                                  \n",
      "7  Orthodox Easter Sunday                                                  \n",
      "8  Orthodox Easter Sunday                                                  \n",
      "9  Orthodox Easter Sunday                                                  \n",
      "\n",
      "  TEForecast  Importance  \n",
      "0                      1  \n",
      "1                      1  \n",
      "2                      1  \n",
      "3                      1  \n",
      "4                      1  \n",
      "5                      1  \n",
      "6                      1  \n",
      "7                      1  \n",
      "8                      1  \n",
      "9                      1  \n"
     ]
    }
   ],
   "source": [
    "mydata = te.getCalendarData(output_type= 'df')\n",
    "print(mydata)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "         symbol                 date     value\n",
      "0   PRTESP24031  1997-12-31T00:00:00     707.0\n",
      "1   PRTESP24031  1998-12-31T00:00:00    7020.0\n",
      "2   PRTESP24031  2000-12-31T00:00:00   54310.0\n",
      "3   PRTESP24031  2002-12-31T00:00:00   89710.0\n",
      "4   PRTESP24031  2003-12-31T00:00:00    5290.0\n",
      "5   PRTESP24031  2004-12-31T00:00:00    8792.0\n",
      "6   PRTESP24031  2005-12-31T00:00:00    5730.0\n",
      "7   PRTESP24031  2006-12-31T00:00:00  294690.0\n",
      "8   PRTESP24031  2007-12-31T00:00:00  340640.0\n",
      "9   PRTESP24031  2008-12-31T00:00:00  156900.0\n",
      "10  PRTESP24031  2009-12-31T00:00:00   22385.0\n",
      "11  PRTESP24031  2010-12-31T00:00:00  184210.0\n",
      "12  PRTESP24031  2011-12-31T00:00:00    4520.0\n",
      "13  PRTESP24031  2012-12-31T00:00:00  640320.0\n",
      "14  PRTESP24031  2014-12-31T00:00:00   60868.0\n",
      "15  PRTESP24031  2015-12-31T00:00:00    1140.0\n",
      "16  PRTESP24031  2016-12-31T00:00:00   11362.0\n",
      "17  PRTESP24031  2017-12-31T00:00:00    9277.0\n"
     ]
    }
   ],
   "source": [
    "mydata = te.getCmtHistorical(symbol = 'PRTESP24031', output_type = None)\n",
    "\n",
    "print(mydata)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEWCAYAAACufwpNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi40LCBodHRwOi8vbWF0cGxvdGxpYi5vcmcv7US4rQAAIABJREFUeJzt3XeYVOX5//H3zdI7SJGmIFVUuqDYwKjBHg1GUbHmixqNxmhi7xqjxhq7EbtgV0AMNopGUXrvTfqCStmF7ffvj3P254QMy+wyszM7+3ld11w788w5Zz4zC3PveZ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jmAPb+6K94fV4HEBzpOAuYl2L/7nsAU8NtfQg0SpFctYEfgQZ781klKNtdBH9EzQVeA2qUJZOmaRERkbip1N1fIiISXyoqIiISNyoqIiISNyoqIiISNyoqIiISNyoqIqVkZlm7PL7IzJ4M719uZheUsO4AMyv1SWVmdpqVcfZrC2YSblKWdUVKq2qyA4ikE3d/dg+LDACygG9i3aaZVXX3UezFCbUi5UV7KiJxZGZ3Fl+nwsyuNrP5ZjbbzEaGE/5dDlxrwfU0jjKz/c3si3CZL8xsv3Ddl83sETMbDzywy95QczP7wILrvswq3vMxsw/DiR3nxXNyR5HS0J6KSOnVsmAm42KNib4XcSPQzt1zzayhu28xs2eBLHf/B4CZjQZedfdXzOwS4AnCacqBTsBx7l5oZhdFbPcJYKK7n2FmGUDdsP0Sd/8pnGJmipm95+4/xutNi8RCeyoipbfT3XsU34Dbd7PcbOCNcLbXgt0sczjBhbcgmBrjyIjn3nH3wijrHAs8A/9/VuWtYfvVZjYLmEwwwWnHmN+RSJyoqIgkzsnAU0BvYJoFFz/ak8h5k7JjfSEzG0AwAebh7t6dYA6zsl0OVmQvqKiIJICZVQHauPt4gotrNSToptpOcNnXYt8QzDwMcB7wdQyb/wK4InydDAuudNgA+Nndd5hZF+CwuLwRkVJSURFJjAzgdTObQ7DX8KgH12gZDZxRPFAPXA1cbGazgaHANTFs+xpgYLjtacBBwL+BquF27iHoAhMpd5qlWERE4kZ7KiIiEjcqKiIiEjcqKiIiEjcqKiIiEjcqKiIiEjcqKiIiEjcqKiIiEjf/D15YecuNJt2YAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import tradingeconomics as te\n",
    "\n",
    "#without a client key only a small sample of data will be given.\n",
    "te.login('guest:guest')\n",
    "\n",
    "\n",
    "#plot a simple chart\n",
    "mydata = te.getHistoricalData(country = 'United states', indicator = 'Imports')\n",
    "\n",
    "plt.title(\"United states - Imports\")\n",
    "plt.grid(True)\n",
    "plt.ylabel(\"Indicator - Imports\")\n",
    "plt.xlabel(\"Historical\")\n",
    "\n",
    "plt.plot(mydata)\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEWCAYAAACjYXoKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi40LCBodHRwOi8vbWF0cGxvdGxpYi5vcmcv7US4rQAAIABJREFUeJzt3XuYXFW55/Hvj4RgACEEtAeTYKJk1AAqkOEy6rEHOBDQQzgjHMIjEp14MnpQxMujYQ5z4FE5R8YLyiOiORIJiEREkAwHCAFSXBwu4SYhCZg2aNISEyEJ0NAhhLzzx14FlaK6O1Ur3dWX3+d56qm93732XmtVdddb+7ZKEYGZmVmOnZrdADMzG/icTMzMLJuTiZmZZXMyMTOzbE4mZmaWzcnEzMyyOZnYoCNpqaTWPqhnP0kdkoZlbqck6dM7ql39vV4bnJxMbECR9EdJx1TFPinpnvJ8RBwQEaUetjNeUkga3mhbImJVROweEa82uo2eSDo/tfOsqvjZKX5+b9XdTZu2eb3NwMnErCE5SagBvwemV8XOSPG6qeD/fduh/Adlg07l3oukwyQ9KOl5SWslfS8Vuys9b0yHqo6UtJOkcyX9SdI6SVdI2jNtp7wnM0PSKuCO6r0bSaMl/UzS05I2SPpNiu8l6UZJf03xGyWNraNLi4FdJR2QtncAMDLFy33uto50SOsCSb8FXgLeUfWa7SvpMUlfSfN7SrpM0hpJf5b0TUnDJL0H+DFwZHrdNqbyJ0haJumFVP4rdfTPBgEnExvsfgD8ICL2AN4JXJPif5OeR6VDVfcCn0yP/0bxYbs78MOq7X0YeA9wXI26r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oMcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import tradingeconomics as te\n",
    "te.login('guest:guest')\n",
    "\n",
    "#without a client key only a small sample of data will be given.\n",
    "\n",
    "#getting data to plot a bar chart\n",
    "mydata = te.fetchMarkets(symbol = 'aapl:us')\n",
    " \n",
    "y_pos = np.arange(len(list(mydata)))\n",
    "\n",
    "#Values from the Open, High, Low, Close got from fetchMarkets(symbol = 'aapl:us', for 2017-01-03 ) \n",
    "performance = [0,1158000,1163300,1147600,1161500]\n",
    "\n",
    "plt.bar(y_pos, performance, align='center', alpha=0.3)\n",
    "plt.xticks(y_pos, mydata)\n",
    "plt.xlabel('AAPL:US - 2017-01-03 ')\n",
    "plt.title('Historical Markets')\n",
    "plt.grid(True)\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "         Symbol           Ticker                   Name        Country  \\\n",
      "0       ADR:IND              ADR     NYSE International  United States   \n",
      "1    BGSMDC:IND   BOTSWANASTOMAR               Gaborone       Botswana   \n",
      "2      BLOM:IND    LEBANONSTOMAR                   Blom        Lebanon   \n",
      "3       BSX:IND              BSX                    BSX        Bermuda   \n",
      "4  BVPSBVPS:IND     PANAMASTOMAR                  BVPSI         Panama   \n",
      "5      BVQA:IND  ECUADORSTOARKET  Ecuador General Index        Ecuador   \n",
      "6      CCMP:IND             CCMP                 NASDAQ  United States   \n",
      "7    COLCAP:IND             IGBC                 COLCAP       Colombia   \n",
      "8   CRSMBCT:IND          CRSMBCT               BCT Corp     Costa Rica   \n",
      "9  DARSDSEI:IND         DARSDSEI                   DSEI       Tanzania   \n",
      "\n",
      "                  Date        Last              Group  \\\n",
      "0  2019-04-05T00:00:00   5513.1900  America G20 Major   \n",
      "1  2019-04-05T00:00:00   7872.8100             Africa   \n",
      "2  2019-04-05T00:00:00    965.1672               Asia   \n",
      "3  2019-04-05T00:00:00   2167.9700            America   \n",
      "4  2019-04-05T00:00:00    437.5000            America   \n",
      "5  2019-04-05T00:00:00   1343.0400            America   \n",
      "6  2019-04-05T00:00:00   7938.6920  America G20 Major   \n",
      "7  2019-04-05T00:00:00   1599.8300            America   \n",
      "8  2019-04-05T00:00:00  10080.6900                      \n",
      "9  2019-04-05T00:00:00   2077.7200             Africa   \n",
      "\n",
      "                        URL  Importance  DailyChange     ...      \\\n",
      "0                  /adr:ind          20      15.5100     ...       \n",
      "1    /botswana/stock-market         999       0.0000     ...       \n",
      "2     /lebanon/stock-market         930      -0.8875     ...       \n",
      "3     /bermuda/stock-market         999     -22.8300     ...       \n",
      "4      /panama/stock-market         920       0.0000     ...       \n",
      "5     /ecuador/stock-market          66      -2.7000     ...       \n",
      "6                 /ccmp:ind           4      46.9080     ...       \n",
      "7    /colombia/stock-market         340       9.6800     ...       \n",
      "8  /costa-rica/stock-market        1000       0.0000     ...       \n",
      "9    /tanzania/stock-market         880      20.7100     ...       \n",
      "\n",
      "   MonthlyPercentualChange  YearlyChange  YearlyPercentualChange  YTDChange  \\\n",
      "0                   2.8697     -137.1300                 -2.4269   608.8500   \n",
      "1                  -0.1068     -672.8000                 -7.8730     9.6200   \n",
      "2                  -1.2087     -217.1796                -18.3685   -11.5875   \n",
      "3                  -8.1692     -335.5300                -13.4024   208.6000   \n",
      "4                  -0.4007      -26.7800                 -5.7681   -13.4300   \n",
      "5                  -4.7422       76.3400                  6.0267   -61.5800   \n",
      "6                   5.7657      988.3480                 14.2201  1272.7540   \n",
      "7                   4.8526       68.1100                  4.4466   267.0300   \n",
      "8                  -5.1386    -3708.7600                -26.8956 -1453.0100   \n",
      "9                  -0.4895     -352.0300                -14.4883    45.2500   \n",
      "\n",
      "   YTDPercentualChange   yesterday    lastWeek   lastMonth    lastYear  \\\n",
      "0              12.4145   5497.6800   5413.6500   5359.3900   5650.3200   \n",
      "1               0.1223   7872.8100   7885.5600   7881.2300   8545.6100   \n",
      "2              -1.1863    966.0547    972.7026    976.9759   1182.3468   \n",
      "3              10.6463   2190.8000   2147.7300   2360.8300   2503.5000   \n",
      "4              -2.9783    437.5000    439.1000    439.2600    464.2800   \n",
      "5              -4.3841   1345.7400   1401.5100   1409.9000   1266.7000   \n",
      "6              19.0934   7891.7840   7729.3210   7505.9200   6950.3440   \n",
      "7              20.0353   1590.1500   1581.9000   1525.7900   1531.7200   \n",
      "8             -12.5980  10080.6900  10079.2100  10626.7600  13789.4500   \n",
      "9               2.2264   2057.0100   2060.2900   2087.9400   2429.7500   \n",
      "\n",
      "    startYear  \n",
      "0   4904.3400  \n",
      "1   7863.1900  \n",
      "2    976.7547  \n",
      "3   1959.3700  \n",
      "4    450.9300  \n",
      "5   1404.6200  \n",
      "6   6665.9380  \n",
      "7   1332.8000  \n",
      "8  11533.7000  \n",
      "9   2032.4700  \n",
      "\n",
      "[10 rows x 24 columns]\n"
     ]
    }
   ],
   "source": [
    "mydata = te. getMarketsData(marketsField = 'index')\n",
    "print(mydata)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "    Symbol  Ticker               Name        Country                 Date  \\\n",
      "0  AAPL:US    AAPL              Apple  United States  2019-04-08T13:32:00   \n",
      "1  ALTR:PL    ALTR              Altri       Portugal  2019-04-08T00:00:00   \n",
      "2   AXP:US     AXP   American Express  United States  2019-04-08T13:32:00   \n",
      "3    BA:US      BA             Boeing  United States  2019-04-08T13:32:00   \n",
      "4   BCP:PL  BCP:PL                BCP       Portugal  2019-04-08T00:00:00   \n",
      "5   CAT:US     CAT        Caterpillar  United States  2019-04-08T13:32:00   \n",
      "6   COR:PL  COR:PL  Corticeira Amorim       Portugal  2019-04-08T00:00:00   \n",
      "7  CSCO:US    CSCO      Cisco Systems  United States  2019-04-08T13:32:00   \n",
      "8   CTT:PL  CTT:PL                CTT       Portugal  2019-04-08T00:00:00   \n",
      "9   CVX:US     CVX            Chevron  United States  2019-04-08T13:32:00   \n",
      "\n",
      "     Type  decimals      Last     MarketCap       URL         ...           \\\n",
      "0  stocks       2.0  197.0600  1.064612e+09  /aapl:us         ...            \n",
      "1  stocks       2.0    7.2650  1.719705e+06  /altr:pl         ...            \n",
      "2  stocks       2.0  110.4500  9.300247e+07   /axp:us         ...            \n",
      "3  stocks       2.0  378.6800  2.097128e+08    /ba:us         ...            \n",
      "4  stocks       2.0    0.2401  3.978537e+06   /bcp:pl         ...            \n",
      "5  stocks       2.0  139.7000  9.103282e+07   /cat:us         ...            \n",
      "6  stocks       2.0   10.4800  1.528450e+06   /cor:pl         ...            \n",
      "7  stocks       2.0   55.0600  2.215726e+08  /csco:us         ...            \n",
      "8  stocks       2.0    2.6040  5.055000e+05   /ctt:pl         ...            \n",
      "9  stocks       2.0  127.0600  2.363951e+08   /cvx:us         ...            \n",
      "\n",
      "   YearlyPercentualChange  YTDChange  YTDPercentualChange  yesterday  \\\n",
      "0                 15.9586    51.0600              34.9726   197.0000   \n",
      "1                 31.8512     1.3150              22.1008     7.2450   \n",
      "2                 20.0152    15.7900              16.6808   110.9600   \n",
      "3                 17.4274    54.8700              16.9451   391.9300   \n",
      "4                -11.9222     0.0115               5.0306     0.2416   \n",
      "5                 -2.2051    17.6500              14.4613   140.3600   \n",
      "6                 -6.0932     1.4300              15.8011    10.3800   \n",
      "7                 33.8682    12.5600              29.5529    55.2100   \n",
      "8                -16.5385    -0.3600             -12.1457     2.6080   \n",
      "9                  9.5250    18.3100              16.8368   126.4200   \n",
      "\n",
      "   lastWeek  lastMonth  lastYear  startYear                            ISIN  \\\n",
      "0  189.9500   174.5200  169.9400   146.0000  US0378331005                     \n",
      "1    7.0450     7.3000    5.5100     5.9500  PTALT0AE0002                     \n",
      "2  109.3000   108.9800   92.0300    94.6600  US0258161092                     \n",
      "3  381.4200   424.4600  322.4800   323.8100  US0970231058                     \n",
      "4    0.2328     0.2274    0.2726     0.2286  PTBCP0AM0007                     \n",
      "5  135.4900   134.8300  142.8500   122.0500  US1491231015                     \n",
      "6   10.4800    10.8400   11.1600     9.0500  PTCOR0AE0006                     \n",
      "7   53.9900    51.6700   41.1300    42.5000  US17275R1023                     \n",
      "8    2.6140     2.7760    3.1200     2.9640  PTCTT0AM0001                     \n",
      "9  123.1800   123.5300  116.0100   108.7500  US1667641005                     \n",
      "\n",
      "            LastUpdate  \n",
      "0  2019-04-08T13:32:00  \n",
      "1  2019-04-08T13:26:00  \n",
      "2  2019-04-08T13:32:00  \n",
      "3  2019-04-08T13:32:00  \n",
      "4  2019-04-08T13:29:00  \n",
      "5  2019-04-08T13:32:00  \n",
      "6  2019-04-08T13:14:00  \n",
      "7  2019-04-08T13:32:00  \n",
      "8  2019-04-08T12:49:00  \n",
      "9  2019-04-08T13:32:00  \n",
      "\n",
      "[10 rows x 28 columns]\n"
     ]
    }
   ],
   "source": [
    "mydata = te.getMarketsComponents(symbols = ['psi20:ind', 'indu:ind'])\n",
    "print(mydata)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
